package net.oschina.app;

import net.oschina.app.pages.PageCommon;
import net.oschina.app.pages.PageLogin;
import net.oschina.app.pages.PageMyTab;
import net.oschina.app.pages.PageNavigation;
import net.oschina.app.pages.PageSettings;

/**
 * Created by Administrator on 2018/3/19.
 */


/*
* 获取pageLgoin类的方法
*
* */
public class Helper {
    private SoloWrap solo;
    PageLogin pageLogin;
    PageCommon pageCommon;
    PageMyTab pageMyTab;
    PageNavigation pageNavigation;
    PageSettings pageSettings;


    public Helper(SoloWrap solo){
        this.solo=solo;
    }

    public PageLogin getPageLogin(){
        if(pageLogin==null){
            pageLogin=new PageLogin(solo);
        }
        pageLogin.initViews();
        return pageLogin;
    }

    public PageCommon getPageCommon(){
        if(pageCommon==null){
            pageCommon=new PageCommon(solo);
        }
        return pageCommon;
    }

    public PageMyTab getPageMyTab(){
        if(pageMyTab==null){
            pageMyTab=new PageMyTab(solo);
        }
        pageMyTab.initViews();
        return pageMyTab;
    }
    public PageNavigation getPageNavvgation(){
        if(pageNavigation==null){
            pageNavigation=new PageNavigation(solo);
        }
        pageNavigation.initViews();
        return  pageNavigation;
    }
    public PageSettings getPageSettings(){
        if(pageSettings==null){
            pageSettings=new PageSettings(solo);
        }
        pageSettings.initViews();
        return pageSettings;
    }

}
